package com.wanlian;

import com.wanlian.File.NetFileInfo;
import com.wanlian.net.core.DeviceClient;
import com.wanlian.util.Utils;

import java.util.Scanner;

/**
 * Hello world!
 */
public class App {
    public static void main(String[] args) throws Exception {
        runClient();
    }

    public static void runClient() throws InterruptedException {
        String uuid = Utils.getUUID();
        DeviceClient deviceClient = new DeviceClient("123456");
        deviceClient.runFileClient();
        while (true) {
            System.out.println("you can type in command");
            Thread.sleep(50);
            Scanner scanner = new Scanner(System.in);
            String s = scanner.nextLine();
            System.out.println(s);
            if (s.equals("1")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("1.jpg");
                deviceClient.sendFile(netFileInfo);
            }
            if (s.equals("2")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("2.mp4");
                deviceClient.sendFile(netFileInfo);
            }
            if (s.equals("3")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("3.mp4");
                deviceClient.sendFile(netFileInfo);
            }
            if (s.equals("4")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("4.mp4");
                deviceClient.sendFile(netFileInfo);
            }
            if (s.equals("5")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("5.mp4");
                deviceClient.sendFile(netFileInfo);
            }
            if (s.equals("6")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("4.jpg");
                deviceClient.sendFile(netFileInfo);
            }
            if (s.equals("11")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("1.jpg");
                deviceClient.sendDownHead(netFileInfo);
            }
            if (s.equals("12")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("2.mp4");
                deviceClient.sendDownHead(netFileInfo);
            }
            if (s.equals("13")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("3.mp4");
                deviceClient.sendDownHead(netFileInfo);
            }
            if (s.equals("14")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("4.mp4");
                deviceClient.sendDownHead(netFileInfo);
            }
            if (s.equals("15")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("5.mp4");
                deviceClient.sendDownHead(netFileInfo);
            }
            if (s.equals("16")) {
                NetFileInfo netFileInfo = new NetFileInfo();
                netFileInfo.setFileName("4.jpg");
                deviceClient.sendDownHead(netFileInfo);
            }
        }
    }
}

